import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

import Layout from "@/layout";

const routes = [
  {
    path: "/",
    component: Layout,
    redirect: "/AfterSales/Operate",
    children: [
      {
        path: "AfterSales/Operate",
        component: () => import('@/views/AfterSales/Operate/index.vue'),
        name: "Operate",
        meta: { title: "运营订单表"},
      },
      {
        path: "AfterSales/SupplyChain",
        component: () => import('@/views/AfterSales/SupplyChain/index.vue'),
        name: "SupplyChain",
        meta: { title: "供应链分单"},
      },
      {
        path: "AfterSales/DelayedReporting",
        component: () => import('@/views/AfterSales/DelayedReporting/index.vue'),
        name: "DelayedReporting",
        meta: { title: "延迟报备单"},
      },
      {
        path: "AfterSales/ShippingCirculation",
        component: () => import('@/views/AfterSales/ShippingCirculation/index.vue'),
        name: "ShippingCirculation",
        meta: { title: "发货流转单"},
      },
      {
        path: "AfterSales/ReturnGoods",
        component: () => import('@/views/AfterSales/ReturnGoods/index.vue'),
        name: "ReturnGoods",
        meta: { title: "退货流转单"},
      },
      {
        path: "AfterSales/ExchangeGoods",
        component: () => import('@/views/AfterSales/ExchangeGoods/index.vue'),
        name: "AfterSalesExchangeGoods",
        meta: { title: "换货流转单"},
      },
      {
        path: "AfterSales/Offline",
        component: () => import('@/views/AfterSales/Offline/index.vue'),
        name: "AfterSalesOffline",
        meta: { title: "线下订单表"},
      },
      {
        path: "AfterSales/PurchaseLists",
        component: () => import('@/views/AfterSales/PurchaseLists/index.vue'),
        name: "PurchaseLists",
        meta: { title: "采购列表"},
      },
      {
        path: "AfterSales/PurchaseOrder",
        component: () => import('@/views/AfterSales/PurchaseOrder/index.vue'),
        name: "PurchaseOrder",
        meta: { title: "采购订单"},
      },
      {
        path: "Inventory/StockUp",
        component: () => import('@/views/Inventory/StockUp/index.vue'),
        name: "StockUp",
        meta: { title: "备货入库明细"},
      },
      {
        path: "Inventory/ExchangeGoods",
        component: () => import('@/views/Inventory/ExchangeGoods/index.vue'),
        name: "InventoryExchangeGoods",
        meta: { title: "退货入库明细"},
      },
      {
        path: "Outbound/NewOrderOutbound",
        component: () => import('@/views/Outbound/NewOrderOutbound/index.vue'),
        name: "NewOrderOutbound",
        meta: { title: "新订单出库日报"},
      },
      {
        path: "Outbound/ExchangeGoods",
        component: () => import('@/views/Outbound/ExchangeGoods/index.vue'),
        name: "OExchangeGoods",
        meta: { title: "换货出库日报"},
      },
      {
        path: "Refund/index",
        component: () => import('@/views/Refund/index.vue'),
        name: "Refund",
        meta: { title: "退款跟进单"},
      },
      {
        path: "Install/index",
        component: () => import('@/views/Install/index.vue'),
        name: "InstallIndex",
        meta: { title: "安装日报"},
      },
      {
        path: "PlaceAnOrder/index",
        component: () => import('@/views/PlaceAnOrder/index.vue'),
        name: "PlaceAnOrder",
        meta: { title: "售后日报"},
      },
      /*{
        path: "NewMeth/index",
        component: () => import('@/views/NewMeth/index.vue'),
        name: "NewMeth",
        meta: { title: "测试用例"},
      },*/
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
